package ar.com.gep.soccer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ar.com.gep.soccer.exception.EditionBusinessException;
import ar.com.gep.soccer.facade.TournamentFacade;
import ar.com.gep.soccer.services.EditionService;
import ar.com.gep.soccer.services.dto.EditionDTO;
import ar.com.gep.soccer.services.dto.RoundDTO;

@Service
public class EditionServiceImpl implements EditionService {

	@Autowired
	private TournamentFacade facade;

	@Override
	public EditionDTO getEdition(final Long id) throws EditionBusinessException {
		return facade.getEdition(id);
	}

	@Override
	public EditionDTO save(final EditionDTO dto) throws EditionBusinessException {
		return facade.saveEdition(dto);
	}

	@Override
	public Boolean getCanPlay(final Long id) throws EditionBusinessException {
		return facade.canPlayEdition(id);
	}

	@Override
	public RoundDTO playWeek(final Long id) throws EditionBusinessException {
		return facade.playEditionWeek(id);
	}

	
}
